#include <iostream>
using std::cout;
using std::endl;

class Point{
public:
    Point(int x,int y)
    : _ix(x)
    , _iy(y)
    {
        cout <<"Point(int,int)" << endl;
    }

    Point(const Point & rhs){
        _ix = rhs._ix;
        _iy = rhs._iy;
        cout << "Point(const Point &)" << endl;
    }
    void print(){
        cout << "(" << _ix << ","
            << _iy << ")" << endl;
    }
private:
    int _ix;
    int _iy;
};

void test0(){
    int a = 2;
    int b = a;

    Point pt(2,3);
    //pt2的创建没有用到显式给出的构造函数
    //即使没有显式给出拷贝构造函数，pt2依然创建成功
    //因为默认给了一个拷贝构造函数
    Point pt2 = pt;
    /* Point pt2(pt); */
    pt2.print();

}

int main(void){
    test0();
    return 0;
}
